package com.xulinhao.edu.client;

import com.xulinhao.commonutils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author xulinhao
 * @create 2021-09-01 21:27
 */
@FeignClient(name = "service-vod",fallback = VodFileDegradeFeignClient.class)//调用的服务名称
@Component
public interface VodClient {
    //定义调用的方法路径
    //根据视频id删除阿里云视频
    @DeleteMapping(value = "/eduvod/video/removeById/{id}")
    public R removeVideo(@PathVariable("id") String id);

    //定义调用删除多个视频的方法
    @DeleteMapping("/eduvod/video/delete-batch")
    public R deleteBatch(@RequestParam("videoIdList") List<String> videoIdList);
}
